In [37]:
import emission.storage.decorations.location_queries as lq
In [38]:
reload(lq)
Out[38]:
In [39]:
%matplotlib inline
In [40]:
lq.get_uuid_list()
Out[40]:
In [41]:
import datetime as pydt
In [42]:
import pytz
In [43]:
get_jul_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))
In [44]:
get_aug_dt = lambda date: pydt.datetime(2015,8,date,tzinfo=pytz.timezone("America/Los_Angeles"))
In [45]:
import emission.analysis.plotting.leaflet_osm.our_plotter as lo
In [46]:
reload(lo)
Out[46]:
In [47]:
df = lq.get_plottable_df(lq.get_uuid_list()[0], "time", get_jul_dt(29), get_jul_dt(30))
In [48]:
df.shape
Out[48]:
In [49]:
df.mAccuracy.hist(bins=20)
Out[49]:
In [50]:
df.mAccuracy.quantile(0.97)
Out[50]:
In [51]:
import numpy as np
In [52]:
np.count_nonzero(df.mAccuracy > 100)
Out[52]:
In [53]:
np.count_nonzero(df.mAccuracy > 200)
Out[53]:
In [54]:
df[df.mAccuracy > 200]
Out[54]:
In [55]:
tidx = df[df.mAccuracy > 200].index; tidx
Out[55]:
In [56]:
df.loc[tidx]
Out[56]:
In [57]:
max(tidx)
Out[57]:
In [58]:
min(tidx)
Out[58]:
In [59]:
def get_map_list(user_id, loc_filter, start_dt, end_dt):
df = lq.get_plottable_df(user_id, loc_filter, start_dt, end_dt)
sp = lq.get_potential_split_index(df)
print "original split indices are %s" % sp
print df.formatted_time.iloc[sp]
return lo.get_map_list(df, sp)
In [60]:
def find_outlier_threshold(df_with_speeds):
quartile_vals = df_with_speeds.quantile([0.25, 0.75]).speed
print("quartile values are %s" % quartile_vals)
iqr = quartile_vals.iloc[1] - quartile_vals.iloc[0]
print("iqr %s" % iqr)
return quartile_vals.iloc[1] + 3 * iqr
In [61]:
def find_outlier_threshold_simple(with_speeds_df):
return with_speeds_df.speed.quantile(0.99)
In [62]:
def find_areas_of_interest(df):
# Calculate speeds
point_list = [AttrDict(row) for row in df.to_dict('records')]
zipped_points_list = zip(point_list, point_list[1:])
speeds = [calSpeed(p1, p2) for (p1, p2) in zipped_points_list]
speeds.insert(0, 0)
with_speeds_df = pd.concat([df, pd.Series(speeds, name="speed")], axis=1)
# Calculate speed outliers using the InterQuartile Range https://en.wikipedia.org/wiki/Outlier
# speedThreshold = find_outlier_threshold(with_speeds_df)
speedThreshold = find_outlier_threshold_simple(with_speeds_df)
with_speeds_df.speed.hist(bins=20)
print("speedThreshold = %d" % speedThreshold)
# Find points with speeds above 95%
candidateIndices = np.nonzero(with_speeds_df.speed > speedThreshold)[0]
print("Found %d potential outliers, list = %s" % (len(candidateIndices), candidateIndices))
if len(candidateIndices == 1):
candidateClusterCenters = [candidateIndices]
print("Only one candidate, cluster centers are %s" % candidateClusterCenters)
else:
from sklearn.cluster import AffinityPropagation
af = AffinityPropagation().fit([[i] for i in candidateIndices])
candidateClusterCenters = af.cluster_centers_
print("Found %d clusters with centers %s" % (len(candidateClusterCenters), candidateClusterCenters))
dfList = []
for cc in candidateClusterCenters:
print("Considering candidate cluster center %s" % cc)
lowRange = max(cc[0]-5,0)
highRange = min(cc[0]+5,with_speeds_df.shape[0])
print("lowRange = max(%s, %s) = %s and highRange = max(%s, %s) = %s" % (cc[0]-5,0,lowRange,cc[0]+5,with_speeds_df.shape[0],highRange))
dfList.append(with_speeds_df.loc[lowRange:highRange])
return dfList
In [63]:
def filter_ransac(df):
from sklearn import linear_model
import numpy as np
latArr = [[lat] for lat in df.mLatitude.as_matrix()]
lngArr = df.mLongitude.as_matrix()
model_ransac = linear_model.RANSACRegressor(linear_model.LinearRegression())
model_ransac.fit(latArr, lngArr)
inlier_mask = model_ransac.inlier_mask_
print "Deleted %d points through ransac filtering" % np.count_nonzero(np.logical_not(inlier_mask))
return inlier_mask
In [64]:
def get_filtered_map_list(user_id, loc_filter, start_dt, end_dt):
df = lq.get_plottable_df(user_id, loc_filter, start_dt, end_dt)
accuracy_filtered_df = pd.DataFrame(df[df.mAccuracy < 200].to_dict('records'))
print "filtering points %s" % df[df.mAccuracy > 200].index
print "filtered list size went from %s to %s" % (df.shape, accuracy_filtered_df.shape)
ransac_mask = pd.Series([True] * accuracy_filtered_df.shape[0])
areas_of_interest = find_areas_of_interest(accuracy_filtered_df)
for area in areas_of_interest:
print ("Area size = %s, index = %s with size %s" % (area.shape[0], area.index, len(area.index)))
retain_mask = filter_ransac(area)
print ("Retain mask is of size %d" % len(retain_mask))
ransac_mask[area.index] = retain_mask
print ("Accuracy filtered df shape is %s, ransac_mask size = %s" % (accuracy_filtered_df.shape, len(ransac_mask)))
filtered_df = accuracy_filtered_df[ransac_mask]
sp = lq.get_potential_split_index(filtered_df)
print "filtered split indices are %s" % sp
print df.formatted_time.loc[sp]
return lo.get_map_list(filtered_df, sp)
In [65]:
def get_filter_compare(user_id, loc_filter, start_dt, end_dt):
unfiltered_maps = get_map_list(user_id, loc_filter, start_dt, end_dt)
filtered_maps = get_filtered_map_list(user_id, loc_filter, start_dt, end_dt)
return zip(unfiltered_maps, filtered_maps)
In [66]:
import emission.core.common as ec
def calSpeed(point1, point2):
distanceDelta = ec.calDistance([point1.mLongitude, point1.mLatitude], [point2.mLongitude, point2.mLatitude])
timeDelta = point2.mTime - point1.mTime
# print "Distance delta = %s and time delta = %s" % (distanceDelta, timeDelta)
# assert(timeDelta != 0)
if (timeDelta == 0):
return 0
return distanceDelta/(float(timeDelta)/1000)
In [67]:
tom_dist_filter_df_23 = lq.get_plottable_df(lq.get_uuid_list()[2], "distance", get_jul_dt(23), get_jul_dt(24))
In [68]:
import pandas as pd
In [69]:
filtered_tom_dist_filter_df_23 = pd.DataFrame(tom_dist_filter_df_23[tom_dist_filter_df_23.mAccuracy < 200].to_dict('records'))
In [70]:
filtered_tom_dist_filter_df_23.head()
Out[70]:
In [71]:
filtered_tom_dist_filter_df_23.shape
Out[71]:
In [72]:
from attrdict import AttrDict
In [73]:
point_list = [AttrDict(row) for row in filtered_tom_dist_filter_df_23.to_dict('records')]
In [74]:
zipped_points_list = zip(point_list, point_list[1:])
In [75]:
speeds = [calSpeed(p1, p2) for (p1, p2) in zipped_points_list]
In [76]:
len(speeds)
Out[76]:
In [77]:
speeds.insert(0, 0)
In [78]:
len(speeds)
Out[78]:
In [79]:
import pandas as pd
In [80]:
with_speeds_df = pd.concat([filtered_tom_dist_filter_df_23, pd.Series(speeds, name="speed")], axis=1)
In [81]:
with_speeds_df.speed.hist(bins=20)
Out[81]:
In [82]:
with_speeds_df[with_speeds_df.speed > 100].index
Out[82]:
In [83]:
with_speeds_df.quantile([0.75,0.9,0.95,0.99]).speed
Out[83]:
In [84]:
quartile_vals = with_speeds_df.quantile([0.25, 0.75]).speed
In [85]:
iqr = quartile_vals.iloc[1] - quartile_vals.iloc[0]
In [86]:
minor_outlier = quartile_vals.iloc[1] + 1.5 * iqr; minor_outlier
Out[86]:
In [87]:
major_outlier = quartile_vals.iloc[1] + 3 * iqr; major_outlier
Out[87]:
In [88]:
np.nonzero(with_speeds_df.speed > 144)
Out[88]:
In [89]:
[[pt] for pt in np.nonzero(with_speeds_df.speed > 144)[0]]
Out[89]:
In [90]:
from sklearn.cluster import AffinityPropagation
af = AffinityPropagation().fit(np.array([[68],[69],[70],[100],[101],[102]]))
(af.cluster_centers_, af.labels_, af.get_params)
Out[90]:
In [91]:
for cc in af.cluster_centers_:
print cc
In [92]:
area_of_interest = with_speeds_df[65:75][["mLatitude", "mLongitude", "speed", "mTime", "formatted_time"]]
In [93]:
area_of_interest
Out[93]:
In [94]:
calSpeed(area_of_interest.loc[67], area_of_interest.loc[68])
Out[94]:
In [95]:
calSpeed(area_of_interest.loc[68], area_of_interest.loc[69])
Out[95]:
In [96]:
calSpeed(area_of_interest.loc[69], area_of_interest.loc[70])
Out[96]:
In [97]:
calSpeed(area_of_interest.loc[70], area_of_interest.loc[71])
Out[97]:
In [98]:
calSpeed(area_of_interest.loc[71], area_of_interest.loc[72])
Out[98]:
In [99]:
import folium
In [100]:
m = folium.Map([area_of_interest.mLatitude.mean(), area_of_interest.mLongitude.mean()])
In [101]:
m.div_markers(area_of_interest[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(area_of_interest))
m.line(area_of_interest[["mLatitude", "mLongitude"]].as_matrix().tolist())
In [102]:
import emission.analysis.plotting.leaflet_osm.ipython_helper as ipy
In [103]:
reload(ipy)
Out[103]:
In [104]:
ipy.inline_map(m)
Out[104]:
In [105]:
def smooth_boundary(point_df, maxSpeed = 33):
prev_pt = None
removed_indices = []
for (i, pt) in enumerate(point_df[["mLatitude", "mLongitude", "mTime", "speed"]].to_dict('records')):
pt = AttrDict(dict(pt))
if prev_pt is None:
# Don't have enough data yet, so don't make any decisions
prev_pt = pt
else:
currSpeed = calSpeed(prev_pt, pt)
print("while considering point %s(%s), prev_pt (%s) speed = %s" % (pt, i, prev_pt, currSpeed))
# Should make this configurable
if currSpeed > maxSpeed:
print("currSpeed > 50, removing index %s " % (i))
removed_indices.append(i)
else:
print("currSpeed < 50, retaining index %s " % (i))
prev_pt = pt
retained_indices = point_df.index.delete(removed_indices)
return (retained_indices, removed_indices)
In [106]:
boundary_retained = smooth_boundary(area_of_interest, maxSpeed = 33)
In [107]:
boundary_retained_df = area_of_interest.loc[boundary_retained[0]]
m = folium.Map([boundary_retained_df.mLatitude.mean(), boundary_retained_df.mLongitude.mean()])
m.div_markers(boundary_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(boundary_retained_df))
m.line(boundary_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist())
ipy.inline_map(m)
Out[107]:
In [108]:
import math
In [109]:
def smooth_posdap(points_df, maxSpeed = 150):
quality_segments = []
curr_segment = []
prev_pt = None
for (i, pt) in enumerate(points_df.to_dict('records')):
pt = AttrDict(pt)
if prev_pt is None:
# Don't have enough data yet, so don't make any decisions
prev_pt = pt
else:
currSpeed = calSpeed(prev_pt, pt)
print("while considering point %s, speed = %s" % (i, currSpeed))
# Should make this configurable
if currSpeed > maxSpeed:
print("currSpeed > %d, starting new quality segment at index %s " % (maxSpeed, i))
quality_segments.append(curr_segment)
curr_segment = []
else:
print("currSpeed < %d, retaining index %s in existing quality segment " % (maxSpeed, i))
prev_pt = pt
curr_segment.append(i)
# Append the last segment once we are at the end
quality_segments.append(curr_segment)
print("Number of quality segments is %d" % len(quality_segments))
last_segment = quality_segments[0]
removed_indices = []
for curr_segment in quality_segments[1:]:
print("Considering segments %s and %s" % (last_segment, curr_segment))
get_coords = lambda(i): [points_df.iloc[i]["mLongitude"], points_df.iloc[i]["mLatitude"]]
get_ts = lambda(i): (points_df.iloc[i]["mTime"]/1000)
# I don't know why they would use time instead of distance, but
# this is what the existing POSDAP code does.
print("About to compare curr_segment duration %s with last segment duration %s" %
(get_ts(curr_segment[-1]) - get_ts(curr_segment[0]),
get_ts(last_segment[-1]) - get_ts(last_segment[0])))
if (get_ts(curr_segment[-1]) - get_ts(curr_segment[0]) <=
get_ts(last_segment[-1]) - get_ts(last_segment[0])):
print("curr segment %s is shorter, cut it" % curr_segment)
ref_idx = last_segment[-1]
for curr_idx in curr_segment:
print("Comparing distance %s with speed %s * time %s = %s" %
(math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))),
maxSpeed, abs(get_ts(ref_idx) - get_ts(curr_idx)),
maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx))))
if (math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))) >
(maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx)))):
print("Distance is greater than max speed * time, deleting %s" % curr_idx)
removed_indices.append(curr_idx)
else:
print("prev segment %s is shorter, cut it" % last_segment)
ref_idx = curr_segment[-1]
for curr_idx in reversed(last_segment):
print("Comparing distance %s with speed %s * time %s = %s" %
(math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))),
maxSpeed, abs(get_ts(ref_idx) - get_ts(curr_idx)),
maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx))))
if (abs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))) >
(maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx)))):
print("Distance is greater than max speed * time, deleting %s" % curr_idx)
removed_indices.append(curr_idx)
last_segment = curr_segment
retained_indices = points_df.index.delete(removed_indices)
return (retained_indices, removed_indices)
In [110]:
posdap_retained = smooth_posdap(area_of_interest, maxSpeed=100)
print posdap_retained
posdap_retained_df = area_of_interest.loc[posdap_retained[0]]
m = folium.Map([posdap_retained_df.mLatitude.mean(), posdap_retained_df.mLongitude.mean()])
m.div_markers(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(posdap_retained_df))
m.line(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist())
ipy.inline_map(m)
Out[110]:
In [111]:
posdap_retained = smooth_posdap(area_of_interest, maxSpeed=35)
print posdap_retained
posdap_retained_df = area_of_interest.loc[posdap_retained[0]]
m = folium.Map([posdap_retained_df.mLatitude.mean(), posdap_retained_df.mLongitude.mean()])
m.div_markers(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(posdap_retained_df))
m.line(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist())
ipy.inline_map(m)
Out[111]:
In [112]:
def smooth_posdap(points_df, maxSpeed = 150):
quality_segments = []
curr_segment = []
prev_pt = None
for (i, pt) in enumerate(points_df.to_dict('records')):
pt = AttrDict(pt)
if prev_pt is None:
# Don't have enough data yet, so don't make any decisions
prev_pt = pt
else:
currSpeed = calSpeed(prev_pt, pt)
print("while considering point %s, speed = %s" % (i, currSpeed))
# Should make this configurable
if currSpeed > maxSpeed:
print("currSpeed > %d, starting new quality segment at index %s " % (maxSpeed, i))
quality_segments.append(curr_segment)
curr_segment = []
else:
print("currSpeed < %d, retaining index %s in existing quality segment " % (maxSpeed, i))
prev_pt = pt
curr_segment.append(i)
# Append the last segment once we are at the end
quality_segments.append(curr_segment)
print("Number of quality segments is %d" % len(quality_segments))
last_segment = quality_segments[0]
removed_indices = []
for curr_segment in quality_segments[1:]:
print("Considering segments %s and %s" % (last_segment, curr_segment))
get_coords = lambda(i): [points_df.iloc[i]["mLongitude"], points_df.iloc[i]["mLatitude"]]
get_ts = lambda(i): (points_df.iloc[i]["mTime"]/1000)
# I don't know why they would use time instead of distance, but
# this is what the existing POSDAP code does.
print("About to compare curr_segment duration %s with last segment duration %s" %
(get_ts(curr_segment[-1]) - get_ts(curr_segment[0]),
get_ts(last_segment[-1]) - get_ts(last_segment[0])))
if (get_ts(curr_segment[-1]) - get_ts(curr_segment[0]) <=
get_ts(last_segment[-1]) - get_ts(last_segment[0])):
print("curr segment %s is shorter, cut it" % curr_segment)
ref_idx = last_segment[-1]
for curr_idx in curr_segment:
print("Comparing distance %s with speed %s * time %s = %s" %
(math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))),
maxSpeed, abs(get_ts(ref_idx) - get_ts(curr_idx)),
maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx))))
if (math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))) >
(maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx)))):
print("Distance is greater than max speed * time, deleting %s" % curr_idx)
removed_indices.append(curr_idx)
else:
print("prev segment %s is shorter, cut it" % last_segment)
ref_idx = curr_segment[-1]
for curr_idx in reversed(last_segment):
print("Comparing distance %s with speed %s * time %s = %s" %
(math.fabs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))),
maxSpeed, abs(get_ts(ref_idx) - get_ts(curr_idx)),
maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx))))
if (abs(ec.calDistance(get_coords(ref_idx), get_coords(curr_idx))) >
(maxSpeed * abs(get_ts(ref_idx) - get_ts(curr_idx)))):
print("Distance is greater than max speed * time, deleting %s" % curr_idx)
removed_indices.append(curr_idx)
last_segment = curr_segment
retained_indices = points_df.index.delete(removed_indices)
return (retained_indices, removed_indices)
In [113]:
posdap_retained = smooth_posdap(area_of_interest, maxSpeed=35)
print posdap_retained
posdap_retained_df = area_of_interest.loc[posdap_retained[0]]
m = folium.Map([posdap_retained_df.mLatitude.mean(), posdap_retained_df.mLongitude.mean()])
m.div_markers(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(posdap_retained_df))
m.line(posdap_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist())
ipy.inline_map(m)
Out[113]:
In [114]:
from sklearn import datasets
X, y, coef = datasets.make_regression(n_samples=10, n_features=1,
n_informative=1, noise=10,
coef=True, random_state=0)
print X, y, coef
In [115]:
from sklearn import linear_model
latArr = [[lat] for lat in area_of_interest.mLatitude.as_matrix()]; latArr
Out[115]:
In [116]:
lngArr = area_of_interest.mLongitude.as_matrix()
In [117]:
model_ransac = linear_model.RANSACRegressor(linear_model.LinearRegression())
model_ransac.fit(latArr, lngArr)
inlier_mask = model_ransac.inlier_mask_
print inlier_mask
In [118]:
area_of_interest[inlier_mask]
Out[118]:
In [119]:
ransac_retained_df = area_of_interest.loc[inlier_mask]
m = folium.Map([ransac_retained_df.mLatitude.mean(), ransac_retained_df.mLongitude.mean()])
m.div_markers(ransac_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist(), lo.df_to_string_list(ransac_retained_df))
m.line(ransac_retained_df[["mLatitude", "mLongitude"]].as_matrix().tolist())
ipy.inline_map(m)
Out[119]:
In [120]:
my_time_filter_map_list_21 = get_filter_compare(lq.get_uuid_list()[0], "time", get_jul_dt(21), get_jul_dt(22))
ipy.inline_maps(my_time_filter_map_list_21, len(my_time_filter_map_list_21), 2)
Out[120]:
In [121]:
my_dist_filter_map_list_21 = get_filter_compare(lq.get_uuid_list()[0], "distance", get_jul_dt(21), get_jul_dt(22))
ipy.inline_maps(my_dist_filter_map_list_21, len(my_dist_filter_map_list_21), 2)
Out[121]:
In [122]:
my_dist_filter_map_list_22 = get_filter_compare(lq.get_uuid_list()[0], "distance", get_jul_dt(22), get_jul_dt(23))
ipy.inline_maps(my_dist_filter_map_list_22, len(my_dist_filter_map_list_22), 2)
Out[122]:
In [123]:
my_time_filter_map_list_22 = get_filter_compare(lq.get_uuid_list()[0], "time", get_jul_dt(22), get_jul_dt(23))
ipy.inline_maps(my_time_filter_map_list_22, len(my_time_filter_map_list_22), 2)
Out[123]:
In [124]:
tom_time_filter_map_list_22 = get_filter_compare(lq.get_uuid_list()[2], "time", get_jul_dt(22), get_jul_dt(23))
ipy.inline_maps(tom_time_filter_map_list_22, len(tom_time_filter_map_list_22), 2)
Out[124]:
In [125]:
tom_dist_filter_map_list_22 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(22), get_jul_dt(23))
ipy.inline_maps(tom_dist_filter_map_list_22, len(tom_dist_filter_map_list_22), 2)
Out[125]:
In [126]:
import numpy as np
In [127]:
df[df.mLatitude == 37.262226300000002][["mAccuracy", "mTime", "mElapsedRealtimeNanos"]]
Out[127]:
In [128]:
tom_dist_filter_map_list_23 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(23), get_jul_dt(24))
ipy.inline_maps(tom_dist_filter_map_list_23, len(tom_dist_filter_map_list_23), 2)
Out[128]:
In [129]:
my_time_filter_map_list_23 = get_filter_compare(lq.get_uuid_list()[0], "time", get_jul_dt(23), get_jul_dt(24))
ipy.inline_maps(my_time_filter_map_list_23, len(my_time_filter_map_list_23), 2)
Out[129]:
In [130]:
my_time_filter_map_list_24 = get_filter_compare(lq.get_uuid_list()[0], "time", get_jul_dt(24), get_jul_dt(25))
ipy.inline_maps(my_time_filter_map_list_24, len(my_time_filter_map_list_24), 2)
Out[130]:
In [131]:
tom_dist_filter_map_list_24 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(24), get_jul_dt(25))
ipy.inline_maps(tom_dist_filter_map_list_24, len(tom_dist_filter_map_list_24), 2)
Out[131]:
In [132]:
tom_dist_filter_map_list_25 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(25), get_jul_dt(26))
ipy.inline_maps(tom_dist_filter_map_list_25, len(tom_dist_filter_map_list_25), 2)
Out[132]:
In [133]:
tom_dist_filter_map_list_27 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(27), get_jul_dt(28))
ipy.inline_maps(tom_dist_filter_map_list_27, len(tom_dist_filter_map_list_27), 2)
Out[133]:
In [134]:
tom_dist_filter_map_list_28 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(28), get_jul_dt(29))
ipy.inline_maps(tom_dist_filter_map_list_28, len(tom_dist_filter_map_list_28), 2)
Out[134]:
In [135]:
tom_dist_filter_map_list_29 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(29), get_jul_dt(30))
ipy.inline_maps(tom_dist_filter_map_list_29, len(tom_dist_filter_map_list_29), 2)
Out[135]:
In [136]:
tom_dist_filter_map_list_5 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_aug_dt(5), get_aug_dt(6))
ipy.inline_maps(tom_dist_filter_map_list_5, len(tom_dist_filter_map_list_5), 2)
Out[136]:
In [137]:
my_time_filter_map_list_6 = get_filter_compare(lq.get_uuid_list()[0], "time", get_aug_dt(6), get_aug_dt(7))
ipy.inline_maps(my_time_filter_map_list_6, len(my_time_filter_map_list_6), 2)
Out[137]:
In [138]:
unfiltered_maps = get_map_list(lq.get_uuid_list()[0], "time", get_aug_dt(6), get_aug_dt(7))
print len(unfiltered_maps)
filtered_maps = get_filtered_map_list(lq.get_uuid_list()[0], "time", get_aug_dt(6), get_aug_dt(7))
print len(filtered_maps)
In [139]:
tom_dist_filter_map_list_23 = get_filter_compare(lq.get_uuid_list()[2], "distance", get_jul_dt(23), get_jul_dt(24))
ipy.inline_maps(tom_dist_filter_map_list_23, len(tom_dist_filter_map_list_23), 2)
Out[139]:
In [139]:
In [139]: